﻿
@{
    ViewBag.Title = "帮助中心";
    Layout = "~/Views/Shared/_MallLayout.cshtml";
    var app = ViewBag.app_setting as token_app_setting;
}
@model List<article_dto>
<body class="page-qaq">
    <div >
        <div class="qaqTop">
            <div class="innerBox">
                <p class="text fn36 col-white mb40">
                    您好，
                    <br>
                    我们为您提供更多的帮助
                </p>
                <div class="mod-search">
                    <div class="searchBox bg-white radius flex">
                        <div class="searchBtn">
                            <i class="icon-sc"></i>
                        </div>
                        <input class="searchInput fn30 flex-1 search_btn" type="text" placeholder="请输入需要搜索的问题">
                        <a href="javascript:;" class="searchNow fn30 search_btn">搜索</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="title fn30">
            常见问题
            <a href="/user/helpMore" class="col-gray fn28 fn-right">
                更多问题
                <i class="icon-more"></i>
            </a>
        </div>
        <div class="qaqList bg-white fn28">
            @foreach (var item in Model) {
                <div class="item flex" onclick="javascript: location.href='/user/HelpDetail?id=@item.id'">
                    <div class="fn-nowrap flex-1">@item.title</div>
                    <span class="go text-right">
                        <i class="icon-go"></i>
                    </span>
                </div>
            }
        </div>
        @Html.Partial("_HelpService", app)
    </div>
    <script type="text/javascript">
        //$(".search_btn").click(function () {
        //    location.href = '/user/helpSearch';
        //})
        $(".search_btn").blur(function () {
            keyword = $(".search_btn").val();
            if (keyword.length > 0) {
                document.activeElement.blur();
                location.href = '/user/helpSearch?keyword=' + keyword;
            }
        });
        $(".search_btn").keyup(function (event) {
            if (event.keyCode == 13) {
                keyword = $(".search_btn").val();
                if (keyword.length > 0) {
                    document.activeElement.blur();
                    location.href = '/user/helpSearch?keyword=' + keyword;
                }
            }
        });
    </script>
</body>
